package com.cbs.android.widget.tipview;

import android.view.ViewGroup;

import java.util.Observable;

/**
 * Created by broche on 7/4/16.
 */
public abstract class Adapter extends Observable {
    private TipView tipView = null;

    void setTipView(TipView tipView) {
        this.tipView = tipView;
    }

    public abstract ViewHolder onCreateViewHolder(ViewGroup parent, int viewType);

    public abstract void onBindViewHolder(ViewHolder holder, int position);

    public int getItemViewType(int position) {
        return 0;
    }

    public abstract int getItemCount();

    public final void notifyDataSetChanged() {
        this.setChanged();
        this.notifyObservers();
    }
}
